import Vue from 'vue'
import Router from 'vue-router'
import Element from 'element-ui'

import login from '@/components/login'    // 登陆

// import home from '@/components/home'    // 首页
import Home from 'pages/Home'    // 首页
import Autotrophy from 'pages/Autotrophy'    // 自营商城
import Financial from 'pages/Financial'    // 塑云金融
import Customer from 'pages/Customer'    // 客户资源
import Technician from 'pages/Technician'    // 技术专家
import Information from 'pages/Information'    // 资讯中心
import Auction from 'pages/Auction'    // 竞价专区
import Properties from 'pages/Properties'    // 物性库

import companycenter from '@/components/companycenter'    // 企业中心

import myorder from '@/components/myorder'    // 我的订单
import bidding from '@/components/bidding'    // 我的竞价
import myserver from '@/components/myserver'    // 我的服务

import myasset from '@/components/myasset'    // 我的资产
import myincome from '@/components/myincome'    // 收支明细
import mybill from '@/components/mybill'    // 我的发票

import management from '@/components/management'    // 产品管理
import publish from '@/components/publish'    // 发布产品

import myfirm from '@/components/myfirm'    // 我的企业
import myinform from '@/components/myinform'    // 个人信息
import mystaff from '@/components/mystaff'    // 员工管理

import 'element-ui/lib/theme-default/index.css'
Vue.use(Element)
Vue.use(Router)

export default new Router({
  mode: 'history',//可以是去掉#号

  routes: [
   
    {
      path: '/',
      name: 'home',
      component: Home
    },
    // 自营商城
    {
      path: '/autotrophy',
      name: 'Autotrophy',
      component: Autotrophy
    },
    // 塑云金融
    {
      path: '/financial',
      name: 'Financial',
      component: Financial
    },
    // 客户资源
    {
      path: '/customer',
      name: 'Customer',
      component: Customer
    },
    // 技术专家
    {
      path: '/technician',
      name: 'Technician',
      component: Technician
    },
    // 资讯中心 demo
    {
      path: '/information',
      name: 'Information',
      component: Information
    },
    // 竞价专区
    {
      path: '/auction',
      name: 'Auction',
      component: Auction
    },
    // 物性库
    {
      path: '/properties',
      name: 'Properties',
      component: Properties
    },
    // 登录
    {
      path: '/login',
      name: 'login',
      component: login
    },
    // 企业中心
    {
      path: '/companycenter',
      name: 'companycenter',
      component: companycenter,
      children:[
      // 默认我的订单
        {
          path:'',
          name:'myorder',
          component:myorder
        },
      // 我的订单
        {
          path:'/companycenter/myorder',
          name:'myorder',
          component:myorder
        },
        // 我的竞价
        {
          path:'/companycenter/bidding',
          name:'bidding',
          component:bidding
        },
        // 我的服务
        {
          path:'/companycenter/myserver',
          name:'myserver',
          component:myserver
        },
         // 我的资产
        {
          path:'/companycenter/myasset',
          name:'myasset',
          component:myasset
        },
         // 收支明细
        {
          path:'/companycenter/myincome',
          name:'myincome',
          component:myincome
        },
         // 我的发票
        {
          path:'/companycenter/mybill',
          name:'mybill',
          component:mybill
        },
         // 产品管理
        {
          path:'/companycenter/management',
          name:'management',
          component:management
        },
         // 发布产品
        {
          path:'/companycenter/publish',
          name:'publish',
          component:publish
        },
         // 我的企业
        {
          path:'/companycenter/myfirm',
          name:'myfirm',
          component:myfirm
        },
         // 个人信息
        {
          path:'/companycenter/myinform',
          name:'myinform',
          component:myinform
        },
         // 员工管理
        {
          path:'/companycenter/mystaff',
          name:'mystaff',
          component:mystaff
        }
      ]
    },

  ]
})
